package com.captainbank.tcl.tclapplication.ui.activity.function;

import android.support.v7.widget.Toolbar;
import android.widget.ArrayAdapter;

import com.captainbank.tcl.tclapplication.R;
import com.captainbank.tcl.tclapplication.ui.activity.basic.BaseActivity;
import com.captainbank.tcl.tclapplication.ui.views.MailBoxAssociateView;
import com.captainbank.tcl.tclapplication.utils.MailBoxAssociateTokenizer;

import butterknife.BindView;

/**
 * Created by TCL on 2019/4/11.
 * Describe:
 */
public class AutoEmailActivity extends BaseActivity {
    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.associate_email_input)
    MailBoxAssociateView associateEmailInput;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_auto_email;
    }

    @Override
    protected void initView() {
        toolbar.setTitle(getString(R.string.title_auto_email));
        String[] recommendMailBox = getResources().getStringArray(R.array.recommend_mail_box);
        ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.item_associate_mail_list, R.id.tv_recommend_mail, recommendMailBox);
        associateEmailInput.setAdapter(adapter);
        associateEmailInput.setTokenizer(new MailBoxAssociateTokenizer());

    }
}
